<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			#div1{
				width:100px;
				height:100px;
				background: red;
			}
		</style>
	</head>
	<body>
		<script>
			window.onload = function(){
				var oDiv = document.getElementById("div1");
				//单击事件：onclick
				
				//双击事件：ondblclick
				oDiv.ondblclick = function(){
					alert(1);
				}
				oDiv.onmousedown = function(){
//					alert('mousedown');
				}
				        // 鼠标点下
				oDiv.onmouseup = function(){
					alert('up');
				}
				        //鼠标抬起
				
				
				var i=0;
				oDiv.onmousemove = function(){
//					console.log(i++);
				}    
				//鼠标移动时，持续触发
				
				oDiv.onmouseover = function(){
					console.log('over');
				}       //鼠标移入
				   
				oDiv.onmouseout = function(){
					console.log('out');
				}
//				                              鼠标移出      
				 
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
			}
		</script>
		<div id="div1"></div>
	</body>
</html>
































